package com.liuyc.lib.tools.ext

import android.view.ViewGroup

/**
 *  获取指定的 子view  只获取一层
 */
inline fun <reified T> loadChildViewByParentView(parentView: ViewGroup): T? {
    for (i in 0 until parentView.childCount) {
        var childView = parentView.getChildAt(i)
        if (childView is T) {
            return childView
        }
    }
    return null
}